<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8" />
    <title>{eyou:global name='web_name' /}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <!-- 新样式 2020-12-8 -->
    {eyou:static file="users/skin/css/element/index.css" /}
    {eyou:static file="users/skin/userfont/iconfont.css" /}
    {eyou:static file="users/skin/css/e-user.css" /}
    {eyou:include file="users/skin/css/diy_css.htm"/}

    {eyou:static file="/public/static/common/js/jquery.min.js"/}
    {eyou:static file="users/skin/js/vendor.js"/}
    {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
    {eyou:static file="/public/static/common/js/tag_global.js"/}
</head>

<body>

   <!--头部--->
    <div class="ey-header-status">
        <div class="header-status-l">
            <a href="javascript:history.go(-1);"><i class="el-icon-arrow-left"></i></a>
        </div> 
        <div class="header-status-m">用户结算</div> 
        <div class="header-status-r"> </div>
    </div><!--头部 end--->    
    <div class="h50"></div>

    <form action="" name='theForm' id="theForm" method="post">
        {eyou:spsubmitorder id="field"}
        <div class="ey-container">
            <!--温馨提示-->
            {eyou:empty name="$field.PromType"}
                <!--地址：没有地址情况-->
                {if condition="empty($field['ShopAddressInfo'][0])"}
                <div class="item-list" {$field.goAddressList}>
                    <div class="item">
                         <div class="item-l flex align-c"><i class="iconfont icon-shouhuodizhi m-color"></i>选择收货地址</div> 
                         <div class="item-m tr"></div> 
                         <div class="item-r"><i class="el-icon-arrow-right"></i></div>
                     </div>
                </div>
                {else /}
                <!--地址：有地址情况-->
                <div class="item-list address-bg" {$field.goAddressList}>
                    {eyou:volist name='$field.ShopAddressInfo' id='addr_field'}
                    <input type="hidden" name="addr_id" id="addr_id" value="{$addr_field.addr_id}">
                    <div class="item" {$addr_field.ul_il_id}>
                        <div class="item-l flex flex-wrap align-c">
                           <span class="item-text area" id="addr_consignee">{$addr_field.consignee}<p id="addr_mobile">{$addr_field.mobile}</p></span>
                           <span class="line-text"><span id="addr_Info">{$addr_field.Info}</span> <span id="addr_address">{$addr_field.address}</span></span>
                        </div> 
                        <div class="item-m"></div> 
                        <div class="item-r"><i class="el-icon-arrow-right"></i></div>
                    </div> 
                    {/eyou:volist}
                </div>
                {/if}
            {eyou:else/}
                <!--地址：虚拟产品输出信息，可根据自身需求更改-->
                <div class="item-list address-bg">            
                    <div  class="item">
                        <div class="item-l flex flex-wrap align-c">
                          <span>该产品为虚拟产品，仅支持在线支付且无需选择收货地址及运费计算。</span>
                          <span>若产品是充值类产品，请将您的手机号或需充值的卡号填入留言中。</span>
                        </div> 
                        <div class="item-m"></div> 
                        <div class="item-r"></div>
                    </div> 
                </div>
            {/eyou:empty}
            <!--支付列表-->
            <div class="item-list" style="{eyou:eq name='is_wechat' value='1'}display:none;{/eyou:eq}">
                {$field.PayTypeHidden}

                <!-- 支付API列表，套板请务必将整块代码一起复制，包含隐藏域 -->
                <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
                {eyou:sppayapilist id='vo'}
                    {eyou:notempty name="$vo.pay_id"}
                        {neq name="$vo.pay_mark" value="Hupijiaopay"}
                            <div class="item pay-type-item" data-type="zxzf_{$vo.pay_mark}" onclick="payTag2(this)">
                                 <div class="item-l flex align-c"><span class="pay-icon pay-{$vo['pay_mark']}"></span>{$vo.pay_name|rtrim=###,'支付'}</div> 
                                 <div class="item-m tr"></div> 
                                 <div class="item-r">
                                    <span class="pay-select-btn"></span>
                                 </div>
                             </div>
                        {/neq}
                    {/eyou:notempty}
                    {$vo.hidden}
                {/eyou:sppayapilist}
                <input type="hidden" id="PayID">
                <input type="hidden" id="PayMark">
                <input type="hidden" id="PayType">
                <!-- END -->


                {eyou:if condition="empty($field.shop_open_offline) && empty($field.PromType)"}
                <!-- 判断是否开启商城配置中的货到付款开关 并且 判断是否属于实体产品，虚拟产品不支付货到付款 -->
                <div class="item pay-type-item" data-type="hdfk_payOnDelivery" onclick="payTag2(this)">
                   <div class="item-l flex align-c"><span class="pay-icon pay-huodaofukuan"></span>货到付款</div> 
                   <div class="item-m tr"></div> 
                   <div class="item-r">
                      <span class="pay-select-btn"></span>
                   </div>
                </div>
                {/eyou:if}

                {eyou:eq name="$field.pay_balance_open" value="1"}
                <div class="item pay-type-item" data-type="yezf_balance" onclick="payTag2(this)">
                   <div class="item-l flex align-c"><span class="pay-icon pay-yuer"></span>余额支付</div> 
                   <div class="item-m tr"></div> 
                   <div class="item-r">
                      <span class="pay-select-btn"></span>
                   </div>
                </div>
                {/eyou:eq}

                <div class="item yuer-box" id="yezf_balance_tips" style="display: none;">
                   <div class="item-l flex align-c">
                       <span>应付金额：<em class="red">￥<em {$field.PayTotalAmountID}>{$field.TotalAmount}</em></em></span>
                       <span>可用余额：<em class="green">￥{$field.UsersMoney}</em>
                            {lt name='$field.UsersSurplusMoney' value='0'}
                            <em class="red">余额不足<a href="{:url('user/Pay/pay_account_recharge')}" target="_blank">[充值]</a></em>
                            {/lt}
                       </span>
                       <span {lt name='$field.UsersSurplusMoney' value='0'}style="display: none;"{/lt}>支付结余：￥<em class="black" {$field.UsersSurplusMoneyID}>{$field.UsersSurplusMoney}</em></span>
                   </div> 
                </div>
            </div>

            <!--价格、运送费-->
            <div class="item-list">
                {$field.TotalAmountOld}
                <div class="item">
                    <div class="item-l">商品价格</div> 
                    <div class="item-m"></div> 
                    <div class="item-r">￥{$field.TotalAmount}</div>
                </div>
                 <div class="item">
                     <div class="item-l">运送费用</div> 
                     <div class="item-m"></div> 
                     <div class="item-r">￥{$field.ShippingMoney}</div>
                 </div> 
            </div>
            
            <div class="goods-buy">
                {eyou:spordergoods id="shop_field"}
                <div class="goods-item">
                    <div class="goods-item-l">
                        <div class="img"><a href="{$shop_field.arcurl}"><img src="{$shop_field.litpic}"></a></div>
                    </div>
                    <div class="goods-item-r">
                        <div class="title"><a href="{$shop_field.arcurl}">{$shop_field.title}</a></div>
                        <!-- 商品规格 -->
                        {eyou:notempty name='$shop_field.product_spec_list'}
                        <div class="spec">
                            {eyou:volist name='$shop_field.product_spec_list' id='spec'}
                                <span>{$spec.value}</span>
                            {/eyou:volist}
                        </div>
                        {/eyou:notempty}
                        <!-- 商品规格 END-->
                        <div class="pice">
                            <div class="pice-l"><em>￥</em>{$shop_field.users_price}</div>
                            <div class="pice-r">x{$shop_field.product_num}</div>
                        </div>
                    </div>
                </div>
                {$shop_field.ProductHidden}
                {/eyou:spordergoods}
            </div>
            <textarea style="display: none;" rows="3" name="message" placeholder="给商家留言，选填"></textarea>
        </div>
        <div class="h50"></div>
        <!--合计金额 底部-->
        <div class="footer-pay">
            <div class="footer-pay-l">
                <span>共{$field.TotalNumber}件</span>
                <span class="pirce">合计：<em>￥</em><em {$field.TotalAmountId}>{$field.TotalAmount}</em></span>
            </div>
            <div class="footer-pay-r">
                {eyou:eq name="is_wechat" value='2'}
                <a {$field.ShopPaymentPage}>去付款</a>
                {eyou:else/}
                <a onclick="WeChatPayment();">去付款</a>
                {/eyou:eq}
            </div>
        </div>
        {$field.TokenValue}
        {$field.hidden}
        {/eyou:spsubmitorder}
    </form>

    <input type="hidden" id="unified_id">
    <input type="hidden" id="unified_number">
    <input type="hidden" id="transaction_type">
        
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
    {eyou:static file="users/skin/js/shop_under_order.js"/}

    <script type="text/javascript">
        $(function(){
            // 默认支付方式
            $($('.pay-type-item')[0]).trigger("click");
        });
    </script>
